Socket
Socket
Sign inDemoInstall

turf-polygon

Package Overview
Dependencies
Maintainers
8
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-polygon

turf polygon module


Version published
Weekly downloads
7.8K
decreased by-3.39%
Maintainers
8
Weekly downloads
 
Created
Source

turf-polygon

build status

turf polygon module

turf.polygon(rings, properties)

Takes an array of LinearRings and optionally an Object with properties and returns a GeoJSON Polygon feature.

Parameters

parametertypedescription
ringsArray.<Array.>- an array of LinearRings
propertiesObject- an optional properties object

Example

var polygon = turf.polygon([[
 [-2.275543, 53.464547],
 [-2.275543, 53.489271],
 [-2.215118, 53.489271],
 [-2.215118, 53.464547],
 [-2.275543, 53.464547]
]], { name: 'poly1', population: 400});

//=polygon

//=polygon.properties

Installation

Requires nodejs.

$ npm install turf-polygon

Tests

$ npm test

Keywords

FAQs

Package last updated on 06 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc